import {BasePage, BaseInput} from "../../../ts/type";
import {replace} from "../../../ts/util";

export let entityDetailInit = (page: BasePage) => {
    let detailModel = page.models.filter(m => 'detail' == m.formKey)[0]
    detailModel.formInputs.push(replace(new BaseInput('id', 'id'), {
        hidden: true
    }))
// field input auto
// #bind.field.tableName#
    detailModel.formInputs.push(replace(new BaseInput('表名', 'tableName'), {
        span: 12
    }))
// $bind.field.tableName$

// #bind.field.prefix#
    detailModel.formInputs.push(replace(new BaseInput('表前缀', 'prefix'), {
        span: 12
    }))
// $bind.field.prefix$

// #bind.field.className#
    detailModel.formInputs.push(replace(new BaseInput('类名', 'className'), {
        span: 12
    }))
// $bind.field.className$

// #bind.field.module#
    detailModel.formInputs.push(replace(new BaseInput('模块', 'module'), {
        span: 12
    }))
// $bind.field.module$

// #bind.field.pack#
    detailModel.formInputs.push(replace(new BaseInput('包名', 'pack'), {
        span: 12
    }))
// $bind.field.pack$

// #bind.field.path#
    detailModel.formInputs.push(replace(new BaseInput('相对路径', 'path'), {
        span: 12
    }))
// $bind.field.path$

// #bind.field.remark#
    detailModel.formInputs.push(replace(new BaseInput('备注', 'remark'), {
        span: 12
    }))
// $bind.field.remark$

// #bind.field.tableCode#
    detailModel.formInputs.push(replace(new BaseInput('实体编码', 'tableCode'), {
        span: 12
    }))
// $bind.field.tableCode$


}